// ==========================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME     : FI.Net Application Framework
// COMPONENT ID    : FI.Helpers.Data.Configuration.SystemFieldData
// COMPONENT DESC  : Configuration settings for system field
//
// CREATED DATE/BY : 18 Aug 2018 / Tian Mi
//
// REVISION HISTORY:DATE/BY        SR#/CS/PM#/OTHERS           DESCRIPTION OF CHANGE
// ==========================================================================================

using System.ComponentModel;
using System.Configuration;
using FI.Core.Configuration;


namespace FI.Helpers.Data.Configuration
{
    /// <summary>
    /// Configuration settings for system field.
    /// </summary>
    public class SystemFieldData : NamedConfigurationElement
    {
        /// <summary>
        /// Uses to get the name of created by field.
        /// </summary>
        public const string CreatedBy = "CreatedBy";

        /// <summary>
        /// Uses to get the name of created time field.
        /// </summary>
        public const string CreatedTime = "CreatedTime";

        /// <summary>
        /// Uses to get the name of last updated by field.
        /// </summary>
        public const string LastUpdatedBy = "LastUpdatedBy";

        /// <summary>
        /// Uses to get the name of last update time field.
        /// </summary>
        public const string LastUpdatedTime = "LastUpdatedTime";

        /// <summary>
        /// Uses to get the name of transaction id field.
        /// </summary>
        public const string TransactionId = "TransactionId";

        /// <summary>
        /// Uses to get the name of version no field.
        /// </summary>
        public const string VersionNo = "VersionNo";

        private const string FieldNameProperty = "fieldName";

        /// <summary>
        /// Gets the name of system field.
        /// </summary>
        /// <value>The name of the field.</value>
        [ConfigurationProperty(FieldNameProperty, IsRequired = true)]
        public string FieldName
        {
            get { return (string)base[FieldNameProperty]; }
            set { base[FieldNameProperty] = value; }
        }
    }
}